<template>
	<view class="goods-list">
		<uni-card :cover="cover" @click="onClick">

			<view class="img-container">
				<image class="img" slot='cover' :src="goods.image"></image>
			</view>

			<view class="text-container">
				<text class="text">{{goods.name}}</text>
			</view>

			<view slot="actions" class="card-bottom">
				<view class="price-container">
					<text class="price-text">需要：{{goods.price}}分</text>
				</view>
				<view class="remain-container">
					<text class="remain-text">余量：{{goods.remain}}</text>
				</view>

			</view>
		</uni-card>

	</view>
</template>

<script>
	export default {
		name: "goods-info",
		props: {
			goods: {
				type: Object,
				required: true,
			},
		},
		data() {
			return {

			};
		}
	}
</script>

<style lang="scss">
	.goods-list {
		width: 45vw;
		height: 20vh;
	}
</style>